namespace SolidMvvm {
	using System;
	using System.Globalization;
	using System.Windows;
	using System.Windows.Data;

	// Return true for false and vice verse.
	[ValueConversion(typeof(bool), typeof(GridLength))]
	public class TrueToGridLengthZeroAndFalseToGridLengthAutoConverter : IValueConverter {
		public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {
			return (bool)value ? new GridLength(0D) : GridLength.Auto;
		}

		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) {
			throw new NotImplementedException();
		}
	}
}
